package com.rdc.example.dao;

import com.rdc.example.entity.PlayList;

import java.util.List;

public interface PlayListDao {
    boolean insert(PlayList playList) throws Exception;

    boolean deleteById(Integer playListId)  throws Exception;

    boolean update(PlayList playList) throws Exception;

    PlayList getRandomPlayList() throws Exception;

    Integer getRedHeartPlayListIdByUserId(Integer userId) throws Exception;

    PlayList getPlayListById(Integer id) throws Exception;

    Integer countPlayListByUserId(Integer userId) throws Exception;

    List<PlayList> getPlayListsByPageAndUserId(Integer userId, Integer pageBegin, Integer pageSize) throws Exception;

    List<PlayList> searchPlaylistsByTitle(String keyword, Integer pageBegin, Integer pageSize) throws Exception;

    Integer countSearchPlaylistsByTitle(String keyword) throws Exception;
}
